

		<div class="user_detail">
		
        <!-- <div><span >用户图片: </span></div>	
        <div><img id="user_picture" src=""></img></div>	 -->	
		<div><span class="css_class">用户名称: </span><span id="name"></span></div>
		
		<div><span class="css_class">性别: </span><span id="gender"></span></div>
		<div><span class="css_class">邮箱: </span><span id="email"></span></div>
		<div><span class="css_class">手机: </span><span id="phone"></span></div>
		<div><span class="css_class">最后登录时间: </span><span id="last_login_time"></span></div>
        <button onclick="edit()">修改个人信息</button><button onclick="changepassword()">修改密码</button>
        </div>
        <script type="text/javascript">
       
       $(function(){
		$.post('__URL__/showUserInfo',{},function(result){ 			   
			  userJson=result;
			  if (userJson!=null)
			  {
              document.getElementById("name").innerHTML=userJson.name;
			  if (userJson.gender==0) 
			  document.getElementById("gender").innerHTML="男";
			  else
			  document.getElementById("gender").innerHTML="女";
			  document.getElementById("email").innerHTML=userJson.email;
			  document.getElementById("phone").innerHTML=userJson.phone;
			  document.getElementById("last_login_time").innerHTML=userJson.last_login_time;
			  //document.getElementById("user_picture").src=userJson.user_picture;
			  }
			  else
			  {
			    alert("请先登录");
			  }
    	     },'json');  
			
		});
		function edit()
		{
		 // layer.msg("gethere");
		  layer.open({
                 type: 2,
                 title: '修改个人信息',
                 maxmin: true,
                 shadeClose: true, //点击遮罩关闭层
                 area : ['350px' , '280px'],
                 content: '__URL__/edit_user_info.html'
				 });
		}
		
		function changepassword()
		{
		  layer.prompt({
          title: '原密码',
          formType: 1 //prompt风格，支持0-2
          }, function(origin){
           layer.prompt({title: '新密码', formType: 1}, function(newone){
           //layer.msg('原密码：'+ origin +' 新密码：'+ newone);
		    $.post('__URL__/changePassword',{'oldPassword':origin,'newPassword':newone},function(resultList){
            		var msg=resultList.changeInformationResult; 
                    if (msg==0) layer.msg("修改成功");	
					else if (msg==1) layer.msg("原密码错误");
					else layer.msg("修改失败");			
			},'json');  
          });
          });
		}
</script>